Storage system and control method for managing use of physical storage areas

ABSTRACT

An object of the present invention is to improve the usage efficiency of a storage extent in a storage system using the Allocation on Use (AOU) technique. A controller in the storage system allocates a storage extent in an actual volume to an extent in a virtual volume accessed by a host computer, detects any decrease in necessity for maintaining that allocation, and cancels the allocation of the storage extent in the actual volume to the extent in the virtual volume based on the detection result.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application relates to and claims priority from Japanese PatentApplication No. 2006-114933, filed on Apr. 18, 2006, the entiredisclosure of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to a storage system that performs datastorage control on storage devices such as a hard disk drive(hereinafter referred to as a “HDD”).

In accordance with the increase in the amount of data managed in acomputer system including a storage system, and a server and hostcomputer connected to the storage system via a communication path suchas a network, the amount of the storage extents in the storage systemhas been increasing. In a storage system, a volume a host computer canaccess is logically defined, and the host computer can perform datainput and output to/from a storage device by accessing a physicalstorage extent included in the logical volume.

Recently, because the data amount managed by a host computer hasincreased considerably, the volume size, being the storage capacity of avolume, has to be increased to a large extent. If a large-sized storageextent is allocated in advance to a host computer, shortage of storagecapacity for the host computer does not occur, and therefore, thestorage extent size allocated to the host computer does not have to beextended in the middle of processing. However, if a host computer doesnot use so much data, part of the storage extent allocated to thecomputer will remain unused, and that unused storage extent is wasted.Therefore, JP-A-2005-11316 proposes allocating an actual storage extentto an extent in a virtual volume in a storage system when a processor ina host computer writes data to that virtual volume. U.S. Pat. No.6,823,442 discloses providing a storage system with a virtual volumethat is to be accessed by a host computer and allocating a physicalstorage extent to that virtual volume.

Conventional examples concerning the present invention includeJP-A-2005-128771, which relates to a data file system including a dataaccess server with physical storage for storing data, that accesses thephysical storage when receiving an access request; and a data fileserver that sends an access request to the data access server andperforms data filing by using the data access server for data storage,and in which a physical block is effectively released when a logicalblock becomes unnecessary. JP-A-2004-127301 discloses a storage systemincluding a virtual storage space, a physical storage space, a mappingsystem configured to associate a plurality of addresses in the virtualstorage space with respective addresses in the physical storage space,and a controller configured to automatically remove a portion of themapping system according to a priority specification for designating theportion to be removed of the mapping system according to the order.

SUMMARY OF THE INVENTION

The applicant of the present invention has developed a technique called“Allocation on Use (AOU)” to make effective use of storage resources ina storage system. In the AOU technique, a storage system provides avirtual volume that does not have a storage extent to a host computer,and a set of storage extents called a “pool” is linked to the virtualvolume. When a host computer accesses a virtual volume, the storagesystem allocates a storage extent included in the pool to an extent inthe virtual volume accessed by the host computer. The allocation is madewhen the host computer accesses the virtual volume. Because one pool canbe linked to a plurality of virtual volumes, the storage system caneffectively use the storage extents in the pool. The storage systemprepares in advance a virtual volume having an apparent capacity andexpands the storage capacity in the pool according to the usage state ofthe pool.

Because in the AOU technique a storage extent in a pool is allocated toan extent in a virtual volume, the storage extent allocated to thevirtual volume just increases every time a host computer access theextent in the virtual volume. If it is determined that there will not beany substantial access from the host computer to the storage extent, theusage efficiency of the storage extent is reduced if the allocation ofthe storage extents to the virtual volume remains fixed. Moreover,because a storage extent is allocated to the virtual volume when thehost computer accesses the virtual volume, there is still room forimprovement in the throughput of the host computer accessing storageextents in the pool via the virtual volume.

Accordingly, an object of the present invention is to improve the usageefficiency of storage extents in a storage system that utilizes the AOUtechnique. Another object of the present invention is to improve theaccess speed of a host computer accessing a storage extent via a virtualvolume in a storage system that utilizes the AOU technique. Stillanother object of the present invention is to improve the access speedof a host computer accessing a storage extent via a virtual volume, andalso improve the usage efficiency in storage extents in a storage systemthat utilizes the AOU technique.

According to the present invention, a storage extent is allocated to avirtual volume, and, that allocation is cancelled at the occurrence ofcertain events. Accordingly, a storage system in which storage resourcescan be efficiently used can be provided. Examples of possible eventsinclude cancellation of the paired state of a volume pair, completion ofdata in a sub volume storing a snapshot of a main volume being backed upto an external medium; the performing of processing specified by a datadelete command issued from a host computer to the storage system; andthe performing of regular release processing on a storage extent thathas been allocated in advance to a host computer but not accessed by ahost computer.

According to the present invention, a storage system, which has astorage device and a controller that controls data input and outputto/from the storage device in response to requests from a host computerconnected to a storage system via a communication path, includes avirtual volume accessed by the host computer, and an actual volumeincluding a storage extent in the storage device. The host computeraccesses a storage extent in the actual volume via the virtual volume,as the actual volume is allocated to the virtual volume. The controllerallocates a storage extent in the actual volume to an extent in thevirtual volume accessed by the host computer in response to the accessfrom the host computer to the virtual volume, and also detects anydecrease in the necessity for maintaining that allocation, and cancelsthe allocation of the storage extent in the actual volume to the extentin the virtual volume based on the detection result.

Moreover, according to the present invention, a storage system, whichhas a storage device and a controller, that controls data input andoutput to/from the storage device in response to requests from a hostcomputer connected to the storage system via a communication path,includes a virtual volume accessed by the host computer, and an actualvolume including a storage extent in the storage device. The hostcomputer accesses the storage extent of the actual volume via thevirtual volume, as the actual volume is allocated to the virtual volume.The controller allocates a storage extent in the actual volume to anextent in the virtual volume accessed by the host computer in responseto the access from the host computer to the virtual volume, predicts anextent in the virtual volume that will be subsequently accessed by thehost computer, and allocates a storage extent in the actual volume tothe predicted extent.

As described above, according to the present invention, a storage extentis allocated to the virtual volume, and that allocation is cancelledupon the occurrence of certain events, whereby a storage system that canefficiently use storage resources can be provided. Moreover, accordingto the present invention, the access speed of a host computer accessinga storage extent via a virtual volume can be improved in the storagesystem utilizing the AOU technique. Furthermore, in a storage systemutilizing the AOU technique, the access speed of the host computeraccessing a storage extent via a virtual volume can be improved, and theusage efficiency of storage extents can also be improved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a hardware block diagram showing a storage control systemincluding a storage system applying present invention.

FIG. 2 is a functional block diagram of the storage control system shownin FIG. 1.

FIG. 3 is a block diagram showing the relationship between a virtualvolume and a pool.

FIG. 4 is an LU management table.

FIG. 5 is a virtual LDEV management table.

FIG. 6 is a table showing a list of LDEVs a RAID control programprovides to a channel controller and a host computer.

FIG. 7 is a pool management table.

FIG. 8 is a mapping management table.

FIG. 9 is a block diagram showing the relationship between addresses ina virtual LDEV and actual storage extents in LDEVs belonging to a poolshown in the control table in FIG. 8.

FIG. 10 is a pool LDEV management table showing the state where storageextents in a pool LDEV are mapped to extents in a virtual LDEV.

FIG. 11 is a flowchart showing an AOU processing operation in a storagesystem.

FIG. 12 is a flowchart executed by a channel controller according to achannel command control program.

FIG. 13 is a block diagram illustrating a volume pair.

FIG. 14 is a block diagram showing the relationship between a volumepair control program and a channel command control program in a channelcontroller.

FIG. 15 is a volume pair management table.

FIG. 16 is a flowchart showing release processing in response to paircancellation of paired volumes.

FIG. 17 is a flowchart illustrating a “speculative allocation.”

FIG. 18 is a flowchart illustrating processing operations concerning anaccess bit.

FIG. 19 is a flowchart for cancelling mapping of storage extents withthe “0” access bit.

FIG. 20 is a functional block diagram showing a backup operation usingcopy pair volumes.

FIG. 21 is a functional block diagram showing the operationalrelationship between a backup application and a channel controller.

FIG. 22 is a flowchart showing a backup operation.

FIG. 23 is a functional block diagram showing a storage system and aworking of an application program relating to a data base managementsystem (DBMS).

FIG. 24 is a block diagram showing the relationship between a DBMS and achannel command control program.

FIG. 25 is a table showing a free list.

FIG. 26 is a flowchart for recording data in a DBMS.

FIG. 27 is a flowchart for deleting data in a DBMS.

FIG. 28 is a flowchart for a channel controller executing storage extentrelease with reference to a free list.

FIG. 29 is a block diagram relating to program content for releasingstorage extents with a program for monitoring I/O from a host computerto a channel controller.

FIG. 30 is a modified example of FIG. 29.

FIG. 31 is a flowchart showing a system operation relating to FIG. 29.

FIG. 32 is a flowchart for executing a release processing based on bitarrays shown in a pool LDEV management table.

FIG. 33 is a flowchart for erasing data stored in a released storageextent.

FIG. 34 is a block diagram illustrating a system in which a storagesystem is connected to another external storage system.

FIG. 35 is a block diagram showing the correspondence relationshipbetween volumes in the storage systems in the system shown in FIG. 34.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Embodiments of the present invention will be described below withreference to the drawings. In the drawings explained below, onecomponent is provided with one reference number, and repeateddescription of the same component will be omitted or simplified.

FIG. 1 is a hardware block diagram showing a storage control systemincluding a storage system (also called “storage apparatus”) 600 thepresent invention is applied in. The storage system 600 includes aplurality of storage devices 300 and a storage device controller 100that controls input to/output from the storage devices 300 in responseto an input/output request from a plurality of host computers 200.

The host computer 200 is a server (host) or a storage apparatusmanagement computer having a CPU (Central Processing Unit) and memory,etc. For example, a workstation, mainframe computer, personal computeror something similar is used. The host computer 200 may also beconfigured by connecting a plurality of computers to a network. The hostcomputer 200 has an application program that operates on an operatingsystem. The application system may be a bank automated teller machinesystem or an aircraft seat reservation system or the like. The servermay be a working server for executing the application, or a backupserver for executing data backup in the back-end of the working server.

The host computers 1 to 3 (200) are connected, via a LAN (Local AreaNetwork) 400, to the storage system 600. The LAN 400 is a communicationnetwork such as Ethernet (Registered Trademark) or an FDDI (FiberDistributed Data Interface), and the host computers 1 to 3 (200) and thestorage system 600 communicate mutually according to TCP/IP(Transmission Control Protocol/Internet Protocol) Protocol Suite. Thehost computers 1 to 3 (200) request data access to the storage system600 by specifying a file name (data input/output request by files:hereinafter referred to as “file access request”) to channel controllersCHN1 to CHN4 (110) described later.

A backup device 910 is connected to the LAN 400. The backup device 910is a disk device, such as an MO (magneto-optical), CD-R (compactdisk-recordable), or DVD-RAM (digital video disc—random access memory),etc., or a tape device such as a DAT (digital audiotape) tape, cassettetape, open tape, or cartridge tape, etc. The backup device 910 stores abackup of data stored in the storage devices 300 by communicating withthe storage device controller 100 via the LAN 400. The backup device 910is also connected to the host computer 1 (200) and acquires a backup ofdata stored in the storage devices 300 via the host computer 1 (200).

The storage device controller 100 includes the channel controllers CHN1to CHN4 (110). The storage device controller 100 handles, via thechannel controllers CHN1 to CHN4 (110) and the LAN 400, write access andread access between the host computers 1 to 3 (200), backup device 910,and storage device 300. The channel controllers CHN1 to CHN4 (110) eachreceive file access requests from the host computers 1 to 3 (200). Inother words, each of the channel controllers CHN1 to CHN4 (110) has anassigned network address (for example, an IP (Internet Protocol)address) on the LAN 400, and can act as separate NAS server and serve asa NAS server to the host computers 1 to 3 (200) as if independent NAS(network attached storage) servers exist. Because the storage system 600includes the channel controllers CHN1 to CHN4 (110) that separatelyserve as NAS servers, NAS servers that have conventionally been separatecomputers and managed separately are brought together in the singlestorage system 600. With this configuration, the storage system 600 canbe managed collectively, and maintenance work including varioussettings, control and failure management, and version management, etc.,is more efficient.

The host computers 3 and 4 (200) are connected, via a SAN (storage areanetwork) 500, to the storage device controller 100. The SAN 500 is anetwork for exchanging data between the host computers 3 and 4 and thestorage system 600 in blocks, which are data management units in astorage extent provided by the storage devices 300. The communicationbetween the host computers 3 and 4 (200) and the storage devicecontroller 100 via the SAN 500 is generally performed according to SCSI(Small Computer System Interface) Protocol. The host computers 3 and 4(200) request data access in blocks (hereinafter referred to as “blockaccess request”) according to Fibre Channel Protocol.

The SAN 500 is connected to a SAN-capable backup device 900. TheSAN-capable backup device 900 stores a backup of data stored in thestorage devices 300 by communicating with the storage device controller100 via the SAN 500.

The storage device controller 100 includes not only the channelcontrollers CHN1 to CHN4 (110), but also channel controllers CHF1, CHF2,CHA1, and CHA2 (110). The storage device controller 100 communicateswith the host computer 3 or 4 (200) and the SAN-capable backup device900 via the channel controller CHF1 or CHF2 (110) and the SAN 500. Thechannel controllers process access commands from a host computer.

The host computer 5 (200) is connected to the storage device controller100 via neither the LAN 400 nor SAN 500. An example of the host computer5 (200) is a mainframe computer. Communication between the host computer5 (200) and the storage device controller 100 is performed according toa communication protocol, such as FICON (Fibre Connection) (RegisteredTrademark), ESCON (Enterprise System Connection) (Registered Trademark),ACONARC (Advanced Connection Architecture) (Registered Trademark), orFIBARC (Fibre Connection Architecture) (Registered Trademark), etc. Thehost computer 5 (200) transmits a block access request to the storagesystem 600 according to such a communication protocol. The storagedevice controller 100 communicates with the host computer 5 (200)through the channel controller CHA1 or CHA2 (110).

The SAN 500 is connected to another storage system 610. The storagesystem 610 provides the host computers and the storage system 600 withthe ability to provide storage resources the storage system 610 has tothe storage device controller 100. The storage extent in the storageapparatus provided to the host computer is seemingly expanded by thestorage system 610. In some cases the storage system 610 is connected tothe storage system 600 via a communication line other than the SAN 500,such as an ATM (asynchronous transfer mode). Alternatively, the storagesystem 610 can be directly connected to the storage system 600.

As described above, a storage system connectable to other variousnetworks can be configured by having the storage system 600 include thechannel controllers CHN1 to CHN4 (110), channel controllers CHF1 andCHF2 (110), and channel controllers CHA1 and CHA2 (110). In other words,the storage system 600 is a SAN-NAS integrated storage system that isconnected to the LAN 400 via the channel controllers CHN1 to CHN4 (110),and to the SAN 500 via the channel controllers CHF1 and CHF2 (110).

The interconnector 150 mutually connects the respective channelcontrollers 110, shared memory 120, cache memory 130, and respectivedisk controllers 140. Command and data exchange between those channelcontrollers 110, shared memory 120, cache memory 130, and diskcontrollers 140 is performed via the interconnector 150. Theinterconnector 150 is a high-speed bus, such as a super high-speedcrossbar switch, that performs data transmission with high-speedswitching. With this configuration, communication performance betweenthe respective channel controllers 110 is greatly improved, enablinghigh-speed file sharing and high-speed fail-over.

The shared memory 120 and cache memory 130 are memory devices shared bythe channel controllers 110 and disk controllers 140. The shared memory120 is used mainly for storing control information and commands, etc.The cache memory 130 is used mainly for storing data. For example, if adata input/output command received by a channel controller 110 from anhost computer 200 is a write command, the relevant channel controller110 writes the write command to the shared memory 120 and writes thewrite data received from the relevant host computer 200 to the cachememory 130. Meanwhile, the disk controllers 140 monitor the sharedmemory 120. If a disk controller 140 determines that a write command hasbeen written to the shared memory 120, it reads the write data from thecache memory 130 and writes the data to the relevant storage device 300according to the write command.

On the other hand, if a data input/output command received by a channelcontroller 110 from the host computer 200 is a read command, therelevant channel controller 110 writes the read command to the sharedmemory 120, and checks whether or not the data that is to be read existsin the cache memory 130. If that read data exists in the cache memory130, the channel controller 110 reads that data from the cache memory130 and transmits the data to the host computer 200. Meanwhile, if theread data does not exist in the cache memory 130, the disk controller140 that has detected that a read command has been written to the sharedmemory 120 reads the read data from the storage device 300, writes thatdata to the cache memory 130, and writes to the shared memory 120 thatthe disk controller has written the data to the cache memory 130. Whenthe channel controller 110, monitoring the shared memory 120, detectsthat the read data has been written to the cache memory 130, it readsthat data from the cache memory 130 and transmits the data to the hostcomputer 200.

Each disk controller 140 converts data access requests specifying alogical address transmitted from a channel controller 110 to a storagedevice 300 into data access requests specifying a physical address, andwrites or reads data to/from the storage devices 300 in response to anI/O (Input/Output) request output from the channel controller 110. Ifthe storage devices have a RAID (Redundant Array ofIndependent/Inexpensive Disks) configuration, the disk controller 140performs data access according to that RAID configuration. In otherwords, the disk controller controls HDDs, which are the storage devices,and RAID groups. A RAID group includes a plurality of HDD storageextents.

Each storage device 300 includes a single or plurality of disk drives(physical volumes), and provides storage extents accessible from thehost computers 200. In the storage extents provided by the storagedevice 300, a logical volume formed by gathering memory space of asingle or plurality of physical volumes is set. The logical volume setin the storage devices 300 may be a user logical volume accessible fromthe host computers 200 or a system logical volume used for controllingthe channel controllers 110. The system logical volume stores anoperating system executed in the channel controllers 110. A logicalvolume that can be accessed by each channel controller 110 is allocatedto the logical volume the storage devices 300 provide to the hostcomputer. Of course, a plurality of the channel controllers 110 mayshare a single logical volume.

The storage device 300 may be a hard disk device or similar. In thestorage device 300, a RAID-type disk array can be configured with aplurality of storage devices 300. The storage devices 300 and thestorage device controller 100 may be directly connected to each other,or may be connected via a network. Alternatively, the storage devices300 may be integrated with the storage device controller 100.

The management terminal 160 is a computer device for maintaining andmanaging the storage system 600, and is connected to the respectivechannel controllers 110 and disk controllers 140 via an internal LAN151. By operating the management terminal 160, an operator can configuresettings in the disk drives in the storage devices 300 and settings inthe logical volume, and install a microprogram executed in the channelcontrollers 110 and disk controllers 140. The above control may beperformed from a management terminal, or may be performed, via anetwork, with a program that operates on a host computer.

FIG. 2 is a functional block diagram of the storage control system shownin FIG. 1. Each channel controller 110 includes a microprocessor CT1 andlocal memory LM1. A channel command control program is stored in thelocal memory LM1. The microprocessor CT1 executes the channel commandcontrol program by referring to the local memory LM1. The channelcommand control program provides LUs (logical units) to a host computer.The channel command control program processes an access commandtransmitted from a host computer to an LU and converts that access intoan access to an LDEV (logical device). In some cases the channel commandcontrol program accesses an LDEV even when a host computer does notaccess the LDEV. The “LDEV” is a logical volume formed by logicallydividing up part of a RAID group. However, though a virtual LDEV isaccessed by a host computer, it does not have an actual storage extent.A host computer actually accesses an LU, not an LDEV. The “LU” is a unitof the storage extent accessed by a host computer. Some of LUs areallocated to virtual LDEVs. The LU allocated to the virtual LDEV ishereinafter referred to as a “virtual LU,” for convenience, todistinguish it from the LU allocated to an actual volume.

Each disk controller 140 includes a microprocessor CT2 and local memoryLM2. The local memory LM 2 stores a RAID control program and HDD controlprogram. The microprocessor CT2 executes the RAID control program andHDD control program by referring to the local memory LM2. The RAIDcontrol program configures a RAID group with a plurality of the HDDs andprovides LDEVs for the channel command control program, which is ahigher-layer program. The HDD control program executes data read andwrite from/to the HDDs in response to requests from the RAID controlprogram, which is a higher-layer program. The host computer 200Aaccesses an LDEV 12A via the LU 10. The storage extent provided for thehost computer 200B is configured with the AOU function. The hostcomputer 200B accesses a virtual LDEV 16 via a virtual LU 14. A pool 18is allocated to the virtual LDEV 16, and LDEVs 12B and 12C are allocatedto the pool 18. A virtual LU and virtual LDEV are equivalent to avirtual volume. The “pool” is a group of LDEVs allocated to the virtualLDEV. Channel I/F and I/O paths are interfaces, such as Fibre Channel oriSCSI (Internet Small Computer System Interface) interfaces, for a hostcomputer to access a storage subsystem.

FIG. 3 is a block diagram showing the relationship between the virtualvolume and the pool. A host computer accesses the virtual LDEV 16. Theaccessed extent in the virtual volume is mapped to the pool (physicalstorage device) 18. The dynamic mapping is performed in response to anaccess from the host computer to the virtual volume, and the storagesystem utilizes mapping information after the mapping is established. Inthe extents in the virtual volume, an unused extent does not consume aphysical storage device. Therefore, by preparing a sufficiently largevirtual volume in advance, the pool LDEVs can be allocated to thevirtual volume in stages, according the state of the pool 18.

When each channel controller 110 executes the AOU processing accordingto the channel command control program, several management tables areused, each of which will be described below. FIG. 4 is an LU managementtable that maintains a list of LUs. Each LU is specified by combinationof a channel number and LUN. If a virtual bit is OFF, the relevant LU ismapped to an LDEV provided by the RAID control program. If a virtual bitis ON, an LU is mapped to a virtual LDEV.

FIG. 5 is a virtual LDEV management table that maintains a list ofvirtual LDEVs. A virtual LDEV is specified by a virtual LDEV number. Themanagement system for the virtual LDEV number is different from themanagement system for the LDEV number given to the LDEVs provided by theRAID control program. The pool number is used to specify the pool thatis the mapping target for a virtual LDEV.

FIG. 6 shows a list of the LDEVs provided for the channel controllersand a host computer. Each LDEV is specified by the LDEV number. If theusage register entry is “L,” the relevant LDEV is mapped to an LU. Ifthe usage register entry is “P,” the relevant LDEV is included in apool, i.e. the LDEV belongs to a pool. If the usage register is “N,” therelevant LDEV is not in use.

FIG. 7 is a pool management table showing a list of pools. Each pool isspecified by a pool number. An LDEV number list shows the LDEVs includedin each pool (pool LDEVs). FIG. 8 is a mapping management table thatmaintains the mapping state between storage extents in the virtual LDEVand the corresponding storage extents in the relevant pool LDEV. Amapping management table exists for each virtual LDEV. In the exampleshown in FIG. 8, the virtual LDEV number is 0001#. Addresses, beingextents in the virtual LDEV, and corresponding addresses (actualaddresses) in the pool LDEVs are stored in this table.

The “addresses” mentioned above are the respective serial numbers givento each portion of the virtual LDEV and pool LDEV partitioned with afixed size, and any kind of address may be used as long as thecorrespondence relationship between the virtual LDEV and the pool LDEVsused by that virtual LDEV can be understood. The addressing system maybe to the same as, or different from, that used by a host computer whenaccessing an LU.

FIG. 9 is a graph showing the correspondence relationship between theaddresses in the virtual LDEV and the actual storage extents in theLDEVs included in the pool shown in the control table in FIG. 8. The “1”access bit indicates that the mapping between an extent in the virtualLDEV and a storage extent in the pool LDEV has been made based on anaccess command issued from a host computer to a virtual LDEV; in otherwords, the virtual storage extent in the virtual LDEV has been linked tothe actual storage extent in the pool LDEV because a host computeraccessed a virtual LU. The “0” access bit indicates that the mapping hasbeen made for some reason: for example, because allocation has beenestablished by predicting a future access from a host computer. Thosedetails will be described later.

FIG. 10 is a pool LDEV management table relating to the state wherestorage extents in the pool LDEV are mapped to extents in the virtualLDEV. The mapping state in each pool LDEV is maintained as a control bitarray (control information) set for each address in each pool LDEV. Thepool LDEV management table stores pointers linked to bit arrays. Thehead of the bit array is set to “address 0,” and the subsequent bits areset in the order of their addresses. The “0” bit indicates that therelevant storage extent has not been mapped to the virtual LDEV, and the“1” bit indicates that the relevant storage extent has already beenmapped to the virtual LDEV. Referring to FIG. 10, in the LDEV with thepool LDEV number “0003,” the extents with the addresses 0, 1, and 2 aremapped to the virtual LDEV. In the LDEV with the pool LDEV number“0004,” no extent is mapped to the virtual LDEV. The extents with theaddress “0” in the LDEV with the pool LDEV number “0005” are mapped tothe virtual LDEV

The above described control tables are maintained in memory space thatcan be accessed by a channel command control program in the channelcontroller. The content in the control tables can be changed through themanagement terminal shown in FIG. 1. The memory space may be the sharedmemory 120 shown in FIG. 1, or the local memory LM1 in FIG. 2.

FIG. 11 is a flowchart illustrating the AOU operation according to thechannel command control program performed when a host computer accessesan LU. The channel controller executes the AOU processing shown in FIG.11 according to the channel command control program. The channelcontroller, receiving an access command from a host computer to an LU(1100), checks whether or not the virtual bit of the access target LU isON (1102). If the virtual bit is OFF, the processing goes on to step1104 and the access from the host computer to the LU is mapped to theactual volume (LDEV) (the LDEV numbers 0001 and 0002 in FIG. 4).

If the virtual bit is ON in step 1102, the address in the LU that is thehost computer's access designation is converted into a mappingmanagement address in the virtual LDEV (1106). Subsequently, thecontroller CT1 in the channel controller checks whether or not the aboveconverted address is still unregistered for the mapping management tablein FIG. 8 (1108). If the address is not yet registered for the mappingmanagement table, the channel controller acquires a list of the LDEVnumbers belonging to the pool corresponding to the virtual LDEV from thepool management table (1112). The channel controller obtains the X^(th)LDEV (X:=1 . . . ) in the pool LDEV list (1114). The channel controllerchecks whether or not the X^(th) LDEV exists (1116).

If the X^(th) LDEV exists, the channel controller acquires the bit arrayfor the LDEV from the pool LDEV management table (FIG. 10) (1118). Thechannel controller checks whether or not any “0” bit exists in theacquired bit array (1120). If any “0” bit exists, the channel controllersets that bit to “1” (1122). If no “0” bit exists the channel controlleracquires the LDEV of the subsequent number (X++) in the pool LDEV list.In step 1124, the address corresponding to the bit set to “1” isregistered, as an actual address, for the mapping management table (FIG.8). Subsequently, the channel controller sets the access bit in themapping management table to “1” (1126). After that, the channelcontroller maps the access from the host computer to the virtual volume(0001#) to an access to the relevant pool LDEV number and actual address(1128).

If the check result in step 1108 is NO, the channel adapter checks instep 1110 whether or not the access bit in the mapping management tablein FIG. 8 is “0”. If the check result is YES, the access bit is set to“1” (1130), and the channel controller maps the access from the hostcomputer to the virtual volume (0001#) to an access to the relevant poolLDEV number and actual address (1132). If the X^(th) LDEV does not existin step 1116, the channel controller notifies the management terminal ofa pool LDEV shortage error. According to the processing in FIG. 11, whenthe host computer accesses the virtual volume, the channel controllermaps the accessed extent to an address in the actual storage extent.

FIG. 12 is a flowchart showing processing executed by the channelcontroller according to the channel command control program forreleasing a storage extent in the pool LDEV from the mapping to thevirtual volume by deleting the record used for mapping that storageextent in the pool LDEV to a storage extent in the virtual volume fromthe mapping management table and making the released storage extentavailable to another virtual volume, thereby using the storage extentseffectively. First, the channel controller determines the release targetaddress of the storage extent in the virtual volume.

After the address in the virtual volume is determined, the channelcontroller acquires the pool LDEV number and actual address relevant tothe address in the virtual volume from the mapping management table(FIG. 8) (1202). Subsequently, the channel controller deletes the recordconcerning the mapping between the address in the virtual volume and therelevant LDEV number and actual address from the mapping managementtable (1204). After that, the channel adapter replaces, with “0,” thebit of the address in the pool LDEV corresponding to the address in thevirtual LDEV stored in the entries for the relevant pool LDEV in thepool LDEV management table (FIG. 10) (1206). The actual storage extentin the pool LDEV is thereby released from the mapping.

Next, the first example of a release trigger will be described. Therelease trigger in the first example is the cancellation of a volumepair. FIG. 13 is a block diagram illustrating a volume pair. In FIG. 13,a volume pair is formed between LU1 and LU2 for the purpose of backup,etc. LU1 is a sub volume and LU2 is a main volume. A host computeraccesses LU2. The channel controller 110 regularly copies data in themain volume LU2 (copy source) and produces, in LU1, a snapshot of thevolume content of LU2. The sub volume LU1 is associated with a virtualLDEV 1, and the virtual LDEV 1 is mapped to pool LDEVs in a pool. Datain the pool LDEV linked to the sub volume is backed up to an externalmedium, such as a tape device. If the pair relationship between the mainand sub volumes is cancelled, the data content of the copy destinationvolume (sub volume) LU1 becomes unnecessary. In that case, if the subvolume is mapped to the virtual LDEV, the mapping between storageextents in the virtual LDEV and pool LDEV is cancelled and the storageextent in the pool LDEV is released from the unmapped virtual volume.

FIG. 14 is a block diagram showing the relationship between the volumepair control program and channel command control program in the channelcontroller 110. The volume pair control program issues a command to thechannel command control program to control copies between LUs. Thechannel controller controls the settings, cancellation, and statuschange, etc. in a paired volume, according to a command from themanagement terminal. Those operations may also be performed according toa command issued by a host computer via a channel I/F. The channelcontroller releases a storage extent in a pool extent (actual volume)when receiving a paired volume cancellation notice sent from the volumepair control program.

FIG. 15 is a volume pair management table. Combinations of the channelnumber and LUN of paired main and sub volumes are maintained in thetable. The volume pair control program produces a record concerningpaired volumes when the pair relationship is established, and deletesthat record when that pair relationship is cancelled. If the status is“P,” the relevant volume pair is in the “pair state.” If the status is“S,” the relevant volume pair is in the “suspension state.” If thestatus is “C,” the relevant volume pair is in the “copy state.” The pairstate (P) means that if the main volume content is updated, the updatedcontent is promptly copied to the sub volume, and therefore, the mainvolume content coincides with the sub volume content. The suspensionstate (S) means that the above described updating copy processing is notactive. The copy state (C) means that the relevant volumes are in themiddle of the state shift from the suspension state to the pair state,and the difference in the contents between the main and sub volumes isnow being copied. The matched state in the volume content of each volumepair is maintained in the bit array, and pointers linked to each bitarray are maintained in the volume pair management table. The headaddress of the bit array is set to “address 0,” and the subsequent bitsare set in the order of their addresses. The “1” bit indicates that thevolume content in the storage extents corresponding to the relevantaddress is consistent, and the “0” bit indicates that the volume contentin those extents is not consistent. This table is maintained in memoryspace that can be accessed by the programs in the channel controller.

FIG. 16 shows flowcharts illustrating the release processing in responseto volume pair cancellation. The channel controller executes theprocessing shown in FIG. 16 according to the volume pair control programand channel command control program. The channel controller receives acancellation command to cancel the pair state between paired volumesfrom a host computer (1600). The channel controller checks whether ornot the sub volume LU is mapped to a virtual LDEV (1602). If the checkresult is YES, the volume pair control program orders the channelcommand control program to release addresses of all extents in thevirtual LDEV from the mapping (1604).

After that, the record of the relevant volume pair is deleted from thevolume pair management table (FIG. 15) (1606). The channel commandcontrol program, receiving the release order from the volume paircontrol program, cancels the mapping of the specified address in thevirtual LDEV. Accordingly, usage efficiency of storage extents isimproved by cancelling the mapping of the storage extent.

Next, another embodiment of the release processing will be described.FIG. 17 is a flowchart illustrating “speculative allocation,” in which,in the AOU technique, the storage system maps in advance storage extentsin a pool LDEV to extents in the virtual volume that has not yet beenaccessed by a host computer. When the channel controller establishesmapping between the virtual LDEV and pool LDEV in response to an accesscommand received from a host computer, because another address will bealso accessed subsequent to the access target address specified in theabove access command, mapping is established on a storage extent towhich the subsequent access is expected to be made, such as an addressimmediately after the address accessed by the host computer (regardlessof whether or not the host computer subsequently accesses the predictedaddress). That operation is performed generally based on the expectationthat accesses from a host computer concentrate on a specific zone in anLU. However, the prediction of extent to which the subsequent access ismade may vary depending on the pattern of the accesses from the hostcomputer to the virtual device. In the above explanation of thespeculative allocation example, the address that would be subsequentlyaccessed is any of some addresses subsequent to the address specified inthe access command, particularly the address immediately after thespecified address. However, another way of “predicting” may also beavailable: for example, in a certain type of file system an LU isdivided up into units called “cylinder groups,” and it can be predictedthat allocation is performed mainly on addresses (even if theseaddresses are non-contiguous) in the cylinder group that an addressaccessed by a host computer belongs to. If a host computer, does notaccess the above predicted extents, the allocation of those extents tothe virtual volume is cancelled, enabling the storage extents to be usedefficiently.

Referring to FIG. 17, the channel controller, receiving an accesscommand from the host computer (1700), checks whether or not the virtualvolume has been allocated to the access target LU, i.e. the virtual bitis “ON” (1702). If the result is NO, the channel controller determinesthat the host computer accesses an actual volume, and maps the accessfrom the host computer to an access to the LDEV of the relevant LDEVnumber based on the mapping management table (1708). Meanwhile, if thecheck result in the step 1702 is YES, the access target address in theLU accessed by the host computer is converted into a virtual volumeaddress (a1) for mapping management (1704). An address immediately afterthe access target address in the LU accessed by the host computer isalso converted into a virtual volume address (a2) (1706).

Subsequently, the channel controller checks whether or not the address A(a1 or a2) is still unregistered for the mapping management table (FIG.8) (1709). If the result is NO, i.e. the address a1 is registered, thechannel controller maps the address a1 to the LDEV and actual addressspecified by the relevant LDEV number based on the mapping managementtable (1712). If the check result in step 1709 is YES, the channelcontroller acquires a pool LDEV number list from the pool managementtable (FIG. 7) (1710). The channel controller acquires the X^(th)(first) LDEV in the pool LDEV list (1714), and checks whether or not theX^(th) LDEV exits (1716). If the result is YES, the channel controlleracquires the bit array of the relevant LDEV from the pool LDEVmanagement table (1718). Subsequently, the channel controller checkswhether or not the “0” bit exists in the acquired bit array (1724).

If the check result is NO, the processing goes back to step 1714 and thechannel controller acquires the (X+1)^(th) LDEV. Meanwhile, if the checkresult is YES, the “0” bit is replaced with the “1” bit (1726). Afterthat, the channel controller registers the address corresponding to thatbit as an actual address for the mapping management table (FIG. 8)(1728). In step 1730, whether or not the address A in the virtual volumeis a1 is checked. If the check result is YES, the channel controllersets the access bit in the mapping management table (FIG. 8) to “1”(1732). Meanwhile, if the check result is NO, the channel controllersets the access bit to “0” (1734). As described above, the “0” accessbit indicates that the mapping has not been established based on theaccess from the host computer to the virtual volume, i.e. the mappinghas been made for the “speculative allocation.”

Subsequently, the channel adapter maps the access from the host computerto the virtual volume to an access to the relevant pool LDEV number andactual address. If in step 1738 the address accessed by the hostcomputer is a1, the above described allocation processing is repeatedfor the address a2. In other words, the processing goes back to step1709 and the above described processing is repeated. If the X^(th) LDEVdoes not exist in step 1716, the processing goes on to step 1720. Inthat step, whether or not the access target address of the host computeris the address a1 is determined. If the access target address is a1, thechannel controller determines a pool LDEV shortage error (1722).Meanwhile, if the access target address is a2, the LDEV shortage errorprocessing is not performed and the processing ends because the hostcomputer does not actually access that address.

According to the above described processing, when the host computeraccess the virtual volume, a storage extent belonging to the pool isallocated to the access target address of the host computer, and thechannel controller predicts the address in the virtual volume that wouldbe subsequently accessed by the host and maps in advance a storageextent to the above predicted address. Accordingly, if the host computeractually accesses the predicted address afterward, a write command canbe promptly executed in the mapped storage extent.

As shown in the flowchart in FIG. 18, if the host computer accesses astorage extent with the “0” access bit, that access bit is changed to“1.” The channel controller converts the access target address of thehost computer into an address for mapping management (1800). The channelcontroller acquires the relevant LDEV number and actual address from themapping management table (1802). The channel controller checks whetheror not the access bit stored in the control table shown in FIG. 8 is “0”(1804). If the check result is YES, the access bit is set to “1” (1806).

FIG. 19 is a flowchart for cancelling mapping of a storage extent withthe “0” access bit. A remaining storage extent in the LDEV with the “0”access bit is a redundant extent that the host computer would not belikely to access for a while. In that case, the storage resources cannotbe used efficiently. Therefore, the mapping of such extents is cancelledfor the purpose of clearing redundant extents. In step 1900, the channelcontroller acquires the first record in the mapping management table(FIG. 8) and checks whether or not the access bit in that record is “0”(1902). If the check result is YES, the channel controller acquires therelevant pool LDEV number and actual address in that record (1903), anddeletes the record (1904). Subsequently, the bit of the above acquiredaddress in the relevant pool LDEV in the pool LDEV management table isset to “0” (1905).

The above described processing is repeated until the last record (1906).In the records in the mapping management table, one having the “0”access bit corresponds to a storage extent that has not actually beenaccessed by the host computer. All records in the mapping managementtable are periodically scanned and the mapping information is deletedbased on the access bit. The access bit is the control information fordetermining whether or not to release a storage extent when the storagesystem performs the release processing.

Next, the third example of mapping cancellation will be described. FIG.20 is a block diagram illustrating this example. In this example, astorage extent is released from mapping after the storage systemacquires backup of the relevant paired volumes. LU1 and LU2 are pairedvolumes. The copy source LU (main volume) may be mapped to a usual LDEVor virtual LDEV. The copy source LU3 is directly mapped to an LDEVhaving actual storage extents. The copy source LU2 is mapped to avirtual LDEV2. The storage system regularly performs copy(re-synchronization), produces a snapshot of volume content of LU2 inthe copy destination (sub volume) LU1, and backs up the data from LU1 toa tape device.

A tape device 210 may be connected to the host computer 200A.Alternatively, the tape device 212 may be connected to the storagesystem so that the storage system controls data backup to the tapedevice 212 according to a SCSI extended copy command from the hostcomputer. When the sequence of processing for the re-synchronization andbackup acquisition ends, the content stored in the sub volume LU1becomes unnecessary. Because that sub volume is mapped to the virtualLDEV, the mapping of the storage extent in the pool LDEV allocated tothe virtual LDEV is cancelled to release the storage extent. Thesequence of processing for the above described re-synchronization,backup acquisition, and extent release is performed by a backupapplication AP that operates on a host computer. Therefore, an extentrelease order is transmitted from the application to the storagesubsystem via an I/O path or network.

As shown in FIG. 21, the backup application issues a command to thechannel command control program and volume pair control program to takea snapshot of an LU and copy the backup data to the tape device 212. Thecommand to the volume pair control program may be issued from a controlterminal via the network, or via a channel I/F. The tape device may becontrolled by the backup application itself, or the backup applicationmay, by issuing a command, order the channel command control program tocontrol the tape device.

FIG. 22 shows flowcharts showing an operation for releasing a storageextent after backup of paired volumes is acquired in the tape device.The backup application in the host computer orders the volume paircontrol program to perform copy between the paired volumes (2200, 2214).The volume pair control program checks the status of the volume pair(2216). If the status is “P” in step 2216, the volume pair controlprogram does nothing and waits for an order from the backup application.If the status is not “P” in step 2216, the volume pair control programorders the channel command control program to execute copy between thepaired volumes (2218). At this point in time, the status shifts to “C.”The volume pair control program changes the status to “P” when the copyexecuted by the channel command control program ends.

The backup application waits until the pair status becomes “P” (2202),and orders the copy between the paired volumes stopped (2204). Thevolume pair control program changes the status to “S” in response tocopy suspension between the paired volumes (2226). The backupapplication gives the order for copy from the sub volume to the tape(2206). The channel command control program, receiving that order,executes copy from the sub volume to the tape (2228). The backupapplication waits until the copy is finished (2208), and determineswhether or not the LU accessed by the sub volume is the virtual LDEV. Ifthe result is YES, the backup application orders the channel commandcontrol program to cancel the mapping of addresses of all extents in thevirtual LDEV.

The channel command control program releases, from the mapping, theextents in the pool LDEV that are mapped to the addresses of all extentsin the virtual LDEV when the copy is finished and the release ordered(2232). By executing the above described processing, storage extents inthe virtual volume linked to the sub volume are released from mappingwhen the copy between the paired volumes is finished.

Next, another embodiment of storage extent release will be describedwith reference to FIG. 23. In this embodiment, the mapping of a storageextent is deleted by an application that operates on the host computer200. As an example of application software, a DBMS (Database ManagementSystem) is used here. The DBMS reads and writes data such as a tablespace, index, and log, etc. from/to a storage extent in an LU. The abovedata occupies an area (segment) of a certain size, and that occupiedsegment has its logical structure inside. A segment is divided up intofurther smaller blocks (data blocks). During operation, the DBMSrecords, updates, or deletes data according to the logical structure ofthe segment in the LU. Therefore, the DBMS has a table for managinginformation about whether or not the data blocks S2 in the segment S1are in use, and that table is referred to as “free list S3.” If an LUincluding data blocks is linked to a virtual LDEV, mapping isestablished when the host computer (DBMS) accesses the LU. Although aunit of the data block size is equivalent to that of the mapped extentsize in this example, the relationship between those sizes is notlimited to that situation.

FIG. 24 is a block diagram showing the relationship between the DBMS andthe channel command control program. The DBMS issues a command to thechannel command control program and accesses an LU. The host computerorders the channel controller to delete mapping of a storage extent andrelease the storage extent. That order command may be issued from an SVP(secure video processor) via a network, or via a channel I/F. FIG. 25 isa table showing a free list. The free list for each segment exists. The“1” usage bit means “in use,” and the “0” usage bit means “not in use”for each data block specified by the data block number.

FIG. 26 is a flowchart for recording data in the DBMS. In FIG. 26, theDBMS scans the free list (2600), and checks whether or not any datablock with the “0” data bit exists (2602). If the check result is YES,the channel controller sets the usage bit of that data block in the freelist to “1” (2604). Subsequently, the channel controller writes data tothe relevant data block (2606). If the check result in step 2602 is NO,the channel controller performs data block shortage error processing(2608).

FIG. 27 is a flowchart for deleting data in the DBMS. The DBMS sets theusage bit of a delete target data block in the free list to “0” (2700),specifies the delete target data block address, and issues an extentrelease command.

FIG. 28 is a flowchart for the channel controller referring to the freelist and releasing a storage extent. The channel controller extracts adata block with the “0” usage bit from the free list (2800), andconverts the address of that data block into an address in the virtualvolume for mapping management (2802). Subsequently, the channelcontroller checks whether or not the above converted address isregistered for the mapping management table shown in FIG. 8 (2804). Ifthe check result is YES, the channel controller releases the storageextent in the pool LDEV corresponding to that address (2806). Thechannel command control program periodically performs the processing inFIG. 28.

FIG. 29 is a block diagram relating to a modified example of FIG. 28,showing a program operation for releasing a storage extent with aprogram for monitoring I/O from the host computer to the channelcontroller. The I/O monitor program in the host computer monitors accesscommands issued from the DBMS. If the I/O monitor program detects anaccess for setting the usage bit of a record in the free list to “0,”the program orders the channel command control program to delete mappingof the address specified in the record and release a storage extent atthat address. The order command may be issued from an SVP via a network,or via a channel I/F. As shown in FIG. 30, the I/O monitor program maybe installed in the channel controller.

FIG. 31 is a flowchart illustrating the operation in FIG. 29. The I/Omonitor program detects an access command from the host computer (3100),and checks whether or not the access command specifies data write to thefree list (3102). If the check result is YES, the I/O monitor programchecks whether or not the command specifies setting the usage bit of adata block to “0” (3104). If the check result is YES, the address of thedata block with the relevant usage bit is converted into an address formapping management (3106). Subsequently, the I/O monitor program checkswhether or not the above converted address is registered for the mappingmanagement table, and releases a storage extent corresponding to theaddress if the check result if YES.

In the above described all of the methods for storage extent releaseprocessing, instead of promptly executing the release processing, theprocessing shown in FIG. 19 may be executed after the lapse of a certainperiod of time after setting the access bit of an actual address that isto be released in the mapping management table to “0.” By doing so, therelease processing can be delayed. Alternatively, the release processingmay be performed according to the flowchart shown in FIG. 32. In otherwords, the channel controller acquires bit arrays of all pool LDEVs fromthe pool LDEV management table (3000). Next, the channel controllercalculates the proportion of the “0” bits in all bits (3002), anddetermines whether or not the proportion is larger than a certain value(3004). If the check result is NO, the channel controller, determiningthat storage extents are insufficient, scans the mapping managementtable and performs the release operation according to the processing inFIG. 19 (3006).

FIG. 33 is a flowchart showing processing for erasing data in a storageextent that is to be released. The channel controller determines theaddress of a storage extent released (3300). Next, the channelcontroller acquires the pool LDEV number and actual address relevant tothat address from the mapping management table (3302), and deletes therelevant record in the mapping management table (3304). The channelcontroller replaces the bit of the address in the pool LDEV in the poolLDEV management table with “0” (3306), and writes a specific datapattern to the storage extent of the relevant address in the pool LDEV(3308).

Examples of the specific data pattern include setting all bits to “0,”rendering a random bit pattern, and repeating such patterns severaltimes. By deleting data as described above, the data that was originallyrecorded in the released storage extent is prevented from being read byother host computers or applications when another mapping is establishedafterward on that storage extent, thereby reducing security risks.

External storage resources in another storage system may also be used asa pool LDEV. In that case, storage resources in a second storage systemare allocated to a virtual volume in a first storage system. A hostcomputer can access the storage resources in the second storage systemby accessing the virtual volume in the first storage system.

FIG. 34 illustrates the state where a storage system 600 is connectedexternally to another storage system 600A. Compare FIG. 34 with FIG. 2.In FIG. 34, reference numeral 501 represents a network, referencenumeral 502 represents an I/O path, reference numeral 503A represents achannel I/F (external mode), reference numerals 503B and 503C representchannel I/Fs (target mode), reference numeral 301 represents a hard diskunit, and reference numeral 601 represents external LUs in an externalstorage subsystem. The channel I/F (target mode) is an interface for anaccess from the host computer to the storage subsystem. The channel I/F(external mode) is an interface for an access from the storage subsystemto the external storage subsystem. The external LUs mean a group ofvolumes (LUs) defined in the external storage subsystem.

FIG. 35 is a block diagram showing the state where the host computerrecognizes the external LU as a volume in the storage system 600 via avirtual volume in the storage system 600. Reference numeral 12Drepresents an external LDEV defined in the external storage system 600A.The external LDEV 12D is allocated to an LU 10. Reference numeral 12Erepresents an external LDEV included in a pool 18, like an LDEV 12B(12C) in the storage system 600. A virtual LDEV 16 in the storage system600 uses the pool 18 for establishing mapping.

The external LDEV is an LU in the external storage subsystem recognizedby the channel command control program via the channel I/F in theexternal mode, that is virtually set as a storage extent equivalent toan LDEV. The external LDEV can be mapped to an LU, accessed by a hostcomputer, and included in the pool and used for mapping to the virtualLDEV, like a usual LDEV (provided by the RAID control program). A poolmay include only the usual LDEVs, or only the external LDEVs, or mayinclude both of them. The external LDEV is used in the same way as theusual LDEV in the LDEV list table (shown in FIG. 6).

1. A storage system having a storage device and a controller thatcontrols data input and output to/from the storage device in response toan access request from a host computer connected to the storage systemvia a communication path, the storage system comprising: an actualvolume including at least one storage extent in the storage device, anda virtual volume accessed by the host computer and including a pluralityof virtual extents, at least one storage extent in the storage devicebeing allocated to at least one of the plurality of virtual extents, andat least one storage extent in the storage device not being allocated toat least one of the plurality of virtual extents, wherein in response toan access request to a first virtual extent in the virtual volume fromthe host computer, the controller allocates a first storage extent inthe storage device to the first virtual extent if no storage extent inthe storage device has been allocated to the first virtual extent, andthe controller detects any decrease in necessity for maintaining anallocation between the first virtual extent and the first storageextent, and cancels the allocation based on the detection result.
 2. Thestorage system according to claim 1 comprising a first virtual volumeand a second virtual volume that are in a copy pair relationship, eachof the first and second virtual volumes having a plurality of virtualextents, at least one storage extent in the storage device beingallocated to at least one of the plurality of virtual extents in each ofthe first and second virtual volumes, and the at least one storageextent in the storage device not being allocated to at least one of theplurality of virtual extents in each of the first and second virtualvolumes wherein the controller detects the cancellation of the copy pairrelationship and cancels the allocation of the at least onecorresponding storage extent to the first or second virtual volume thatis a copy destination.
 3. The storage system according to claim 1comprising a first virtual volume and a second virtual volume that arein a copy pair relationship, each of the first and second virtualvolumes having a plurality of virtual extents, at least one storageextent in the storage device being allocated to at least one of theplurality of virtual extents in each of the first and second virtualvolumes, and the at least one storage extent in the storage device notbeing allocated to at least one of the plurality of virtual extents ineach of the first and second virtual volumes wherein the controllercancels the allocation of the at least one corresponding storage extentto the first or second volume that is a copy destination, after copybetween the first and second volumes has finished and data in the copydestination volume has been backed up to an external medium.
 4. Thestorage system according to claim 1 comprising control memory forstoring control information used for determining the state of an accessfrom the host computer, wherein the controller executes the cancellationaccording to the control information content.
 5. The storage systemaccording to claim 4, wherein the control information is informationindicating whether a storage extent has actually been accessed by thehost computer or is expected to be accessed later by the host computer.6. The storage system according to claim 4, wherein the controllerregularly scans the control information for a storage extent in theactual volume and executes cancellation based on the scan results. 7.The storage system according to claim 1, wherein the controller executesthe cancellation based on the result of executing an application programin the host computer.
 8. The storage system according to claim 1,wherein, on the grounds that an application program in the host computerdeletes data, the controller cancels the allocation of the storageextent in the actual volume related to the deleted data.
 9. The storagesystem according to claim 1, wherein the controller monitors accesscommands from the host computer to the virtual volume and executescancellation based on the access commands.
 10. A storage system having astorage device and a controller, that controls data input and outputto/from the storage device in response to an access request from a hostcomputer connected to the storage device via a communication path, thestorage system comprising: wherein the controller allocates a storageextent in the actual volume to an extent in the virtual volume accessedby the host computer in response to the access from the host computer tothe virtual volume, predicts extents in the virtual volume that will besubsequently accessed by the host computer, and allocates storageextents in the actual volume to the predicted extents, an actual volumeincluding at least one storage extent in the storage device, and avirtual volume accessed by the host computer and including a pluralityof virtual extents, at least one storage extent in the storage devicebeing allocated to at least one of the plurality of virtual extents, andat least one storage extent in the storage device not being allocated toat least one of the plurality of virtual extents, wherein in response toan access request to a first virtual extent in the virtual volume fromthe host computer, the controller allocates a first storage extent inthe storage device to the first virtual extent if no storage extent inthe storage device has been allocated to the first virtual extent, andthe controller predicts extents in the virtual volume that will besubsequently accessed by the host computer, and allocates storageextents in the actual volume to the predicted extents.
 11. The storagesystem according to claim 10, wherein the controller cancels theallocation of the storage extent in the actual volume to the predictedextent based on the state of an access from the host computer to thepredicted extent.
 12. The storage system according to claim 10comprising control information about an extent in the virtual volume fordistinguishing between an extent that has been accessed by the hostcomputer and the predicted extent, wherein the controller executescancellation based on the control information.
 13. The storage systemaccording to claim 12, wherein the controller periodically refers to thecontrol information and executes cancellation based on the same.
 14. Thestorage system according to claim 1, wherein the controller calculatesthe proportion of the storage extent allocated to the virtual volume inthe storage extent in the actual volume and executes cancellation if thecalculated proportion is a certain value or more.
 15. The storage systemaccording to claim 1, wherein the controller deletes data in the storageextent in the actual volume that has been subjected to the cancellation.16. A control method in a storage system having a storage device and acontroller that controls data input and output to/from the storagedevice in response to an access request from a host computer connectedto the storage system via a communication path, the storage systemcomprising an actual volume including at least one storage extent in thestorage device, and a virtual volume accessed by the host computer andincluding a plurality of virtual extents, at least one storage extent inthe storage device being allocated to at least one of the plurality ofvirtual extents, and at least one storage extent in the storage devicenot being allocated to at least one of the plurality of virtual extents,and the control method comprising the steps of: in response to an accessrequest to a first virtual extent in the virtual volume from the hostcomputer, the controller allocating a first storage extent in thestorage device to the first virtual extent if no storage extent in thestorage device has been allocated to the first virtual extent; and thecontroller detecting any decrease in necessity for maintaining anallocation between the first virtual extent and the first storageextent, and canceling the allocation based on the detection result.